precision lowp float;
varying vec2 vUv;

// sampler2D	2D纹理 a 2D texture
uniform sampler2D uTexture;

varying float vElevation;

void main(){
    float height = vElevation + 0.05 * 20.0;
    //根据UV，取出对应颜色
    // vec4 texture2D(sampler2D sampler, vec2 coord)
    // The texture2D function returns a texel, i.e. the (color) value of the texture for the given coordinates.
    // 第一个参数代表图片纹理，第二个参数代表纹理坐标点，通过GLSL的内建函数texture2D来获取对应位置纹理的颜色RGBA值
    vec4 textureColor = texture2D(uTexture,vUv);
    textureColor.rgb*=height;
    // gl_FragColor = vec4(1.0 * height,0.0,0.0,1.0);
    gl_FragColor = textureColor;
}